﻿@foreach (var product in Model.FavoritesList)
{
    <tr>
        <td colspan="5" class="OrderNumber">
            商品编号：<a href="~/Product/ProductDetail?prd=@product.ProductId" target="_blank">@product.ProductId</a>
        </td>
    </tr>
    <tr>
        <td class="img">
            <a href="~/Product/ProductDetail?prd=@product.ProductId" target="_blank">
                <img src="@product.ImageNameSize125" alt="@product.Title" class="favThum">
            </a>
        </td>
        <td class="title"><a href="~/Product/ProductDetail?prd=@product.ProductId" target="_blank">@product.Title</a></td>
        <td class="price">
            <p>现价：￥@product.UnitPrice</p>
            <p>收藏价：￥@product.MarketPrice</p>
        </td>
        @if (product.Active)
        {
            <td class="inventory">@product.DisplayHaveInventory</td>
        }
        else
        {
            <td class="inventory">已下架</td>
        }
        <td class="action">
            <a class="btns dangerous cancelThisFav" data-id="@product.ProductId" href="javascript:;"><i class="fa fa-times"></i> 取消收藏</a>
            @if (product.DisplayHaveInventory == "现货" && product.Active)
            {
                <a class="btns success" onclick="addToCart('@product.ProductId',1)" href="javascript:;"><i class="fa fa-shopping-cart"></i> 加入购物车</a>
                <span class="addToBagTips addToBagTips@(product.ProductId)"></span>
            }
            else
            {
                <span class="btns disabled"><i class="fa fa-shopping-cart disabled"></i> 加入购物车</span>
            }

        </td>
    </tr>
}